Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruff format and lint and tidy top-level #252

Merged
merged 7 commits into from
Nov 29, 2023
Merged

Ruff format and lint and tidy top-level #252

merged 7 commits into from
Nov 29, 2023

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Nov 15, 2023

Description

This is a light application of ruff formatting and linting, meaning that quite a few rules are ignored in the interest of time and recognizing that test coverage might be low.

In addition I did some long-overdue tidying of the top-level directory. There were a bunch of random scripts that were rarely/never used, including a number of Python 2 scripts. These were moved into dev_utils/ or dev_utils/legacy_py2/. I also moved all the NOTES.* files into a NOTES directory.

Interface impacts

Testing

Unit tests

  • Mac (with note)

Note: there is a warning in cheta/cheta/tests/test_comps.py::test_mups_valve related to being unable to get a version for Ska.engarchive. This warning is not new to this PR, it shows up in master testing the same way.

Independent check of unit tests by Jean

  • Linux

Functional tests

No functional testing.

@@ -74,7 +74,7 @@ def sanitize_event_expression(expr):
ast.literal_eval(word)
tokens.append("LITERAL")
except Exception:
raise ValueError("Cannot identify word {!r}".format(word))
raise ValueError("Cannot identify word {!r}".format(word)) from None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the "from None" in this context change the output here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it is what we want.

@taldcroft taldcroft merged commit 1daa325 into master Nov 29, 2023
2 checks passed
@taldcroft taldcroft deleted the ruff branch November 29, 2023 21:09
@javierggt javierggt mentioned this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants